Current sense circuit with alternating measurement paths

ABSTRACT

A system includes a motor and a motor controller coupled to the motor. The motor controller includes a current sense circuit configured to: receive a first phase current sense measurement on a first measurement path; receive the first phase current sense measurement on a second measurement path; receive a second phase current measurement on the first measurement path; receive the second phase current on the second measurement path; average the first phase current sense measurement on the first measurement path with the first phase current sense measurement on the second path; and average the second phase current sense measurement on the first measurement path with the second phase current sense measurement on the second path.

BACKGROUND

The proliferation of electronic devices and integrated circuit (IC)technology has resulted in the commercialization of IC products. As newelectronic devices are developed and IC technology advances, new ICproducts are commercialized. One example IC product that is needed inelectronic devices is a direct current (DC) motor controller. In oneexample DC motor controller, a sensorless field oriented control (FOC)algorithm is used to determine rotor position and to generate motorcontrol signals for a 3-phase DC motor (e.g., a brushless DC electricmotor or “BLDC” motor) having a stator (stationary portion of the motor)and a rotor (a rotating portion of the motor). The sensorless FOCalgorithm uses measured phase currents rather than contact sensors orHall-effect sensors, which tend to wear out over time and/or increasedesign complexity. The motor control signals obtained using a sensorlessFOC algorithm are used to control switches of a 3-phase inverter,resulting in different combinations of phase currents depending on theposition of the rotor and the target speed. One of the issues thataffects the accuracy of sensorless FOC-based motor control is gain andoffset mismatch between measured phase currents. Such mismatch causesthe sensorless FOC algorithm to determine inaccurate position estimates,and the resulting phase currents for the DC motor (based on theinaccurate position estimates) cause undesirable torque ripple which inturn causes jittering in the mechanical speed of the DC motor. Thetorque ripple also causes undesirable acoustic noise.

SUMMARY

In accordance with at least one example of the disclosure, a systemcomprises a motor and a motor controller coupled to the motor. The motorcontroller comprises a current sense circuit configured to obtain a setof first phase current sense measurements using a first pair of pathsand to average the set of first phase current sense measurements andconfigured to obtain a set of second phase current measurements using asecond pair of paths and to average the set of second phase currentsense measurements.

In accordance with at least one example of the disclosure, an integratedcircuit (IC) comprises a motor controller circuit. The motor controllercircuit comprises a processor and a current sense circuit coupled to theprocessor. The current sense circuit comprises a first phase currentsense circuit and a second phase current sense circuit. The currentsense circuit also comprises a first multiplexer with inputs coupled tothe first and second phase current sense circuits. The current sensecircuit also comprises a second multiplexer with inputs coupled to thefirst and second phase current sense circuits.

In accordance with at least one example of the disclosure, a motorcontrol method comprises obtaining first phase current sensemeasurements using alternating measurement paths. The motor controlmethod also comprises obtaining second phase current sense measurementsusing alternating measurement paths. The motor control method alsocomprises determining control signals for a motor based on the obtainedfirst phase current sense measurements and the obtained second phasecurrent sense measurements.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 is a block diagram showing a system in accordance with an exampleembodiment;

FIGS. 2A and 2B is a block diagram showing a system with field orientedcontrol (FOC) motor control in accordance with an example embodiment;

FIG. 3 is a diagram showing a current sense circuit for a motorcontroller in accordance with an example embodiment;

FIG. 4 is a graph showing motor speed ripple due to measurement pathgain error with and without the proposed alternating current sensemeasurement paths;

FIG. 5 is a graph showing theta error due to measurement path gain errorwith and without the proposed alternating current sense measurementpaths;

FIG. 6 is a graph showing motor speed ripple due to measurement pathgain error and offset with and without the proposed alternating currentsense measurement paths;

FIG. 7 is a graph showing theta error due to measurement path gain errorand offset with and without the proposed alternating current sensemeasurement paths; and

FIG. 8 is a flow chart showing a motor control method in accordance withan example embodiment.

DETAILED DESCRIPTION

Disclosed herein is a current sense circuit included with a device(e.g., integrated circuit or “IC”) or motor controller, where thecurrent sense circuit includes a path alternation circuit configured toalternate between different current sense measurement paths to obtaincurrent sense measurements. In different examples, the current sensecircuit is part of an integrated circuit, multi-die module (MDM),multi-chip module, system on a chip (SoC), or other commercial circuitor device. In some example embodiments, a motor controller uses thecurrent sense measurements to determine motor control signals for a3-phase direct current (DC) motor. In one example, the motor controlleruses a sensorless field oriented control (FOC) algorithm to determinerotor position from the current sense measurements. The motor controlsignals are then determined based on the rotor position and/or otherparameters. In some example embodiments, the motor control signals areprovided to the control terminals of at least some of the switches of a3-phase inverter, resulting in phase currents (e.g., I_(A), I_(B), orI_(C) herein) in two of the windings of a 3-phase DC motor. In theexample embodiments, the windings are part of the stator of the motor,and proper phase current combinations cause the rotor of the motor torotate around the stator.

With the proposed path alternation circuit, the accuracy of currentsense measurements used by the motor controller is improved, whichresults in more accurate rotor position estimates. With more accuraterotor position estimates, the motor control signals determined by themotor controller are improved, resulting in smoother operation of themotor (less torque ripple, jittering, and acoustic noise).

In some example embodiments, a system includes a 3-phase direct current(DC) motor, a pulse generation circuit coupled to the 3-phase DC motor,and a motor controller coupled to the pulse generation circuit. Themotor controller includes a current sense circuit with a pathalternation circuit, where the path alternation circuit enables thecurrent sense circuit to obtain first phase current sense measurementsusing alternate paths and to average the first phase current sensemeasurements. The path alternation circuit also enables the currentsense circuit to obtain second phase current measurements using thealternate paths and to average the second phase current sensemeasurements.

In some example embodiments, the current sense circuit includes a firstphase current sense circuit and a second phase current sense circuit.The current sense circuit also includes a path alternation circuitcorresponding to a first multiplexer and a second multiplexer withinputs coupled to the first and second phase current sense circuits. Themotor controller uses the first and second phase current measurementsobtained by the current sense circuit to determine motor controlsignals. In one example embodiment, the motor control signals areprovided to a pulse generation circuit that includes a pulse-widthmodulation (PWM) circuit, a driver circuit, and a 3-phase inverter.Specifically, the PWM circuit outputs PWM signals based on the motorcontrol signals. The PWM signals are provided to the driver circuit togenerate drive signals to control switches of the 3-phase inverter. The3-phase inverter outputs phase current to the motor (e.g., a 3-phase DCmotor). During motor operations, new current sense measurements areobtained using the current sense circuit, and motor control operationsare repeated based on the new current sense measurements. To provide abetter understanding, various current sense circuit options and relatedsystems or scenarios are described using the figures as follows.

FIG. 1 is a block diagram showing a system 100 in accordance with anexample embodiment. As shown, the system 100 comprises a motorcontroller 102 coupled to a pulse generation circuit 117, where thepulse generation circuit 117 is coupled to a motor 130 and providesmulti-phase signals 128 to the motor 130. In the example of FIG. 1, thepulse generation circuit 117 includes a PWM controller 118 coupled tothe motor controller 102 and configured to generate PWM signals 120. ThePWM signals 122 are received by a gate driver 122, which provides drivesignals 124 to switches (not shown) of a 3-phase inverter 126, resultingin phase currents 128 to turn the motor 130. In some exampleembodiments, the 3-phase inverter 126 is a conventional 3-phase inverterwith three high-side switches (each coupled to a supply voltage) andthree low-side switches (each coupled to ground), where each of threephase currents for the motor 130 is selectively generated by theoperations of a respective high-side switch and low-side switch ascontrolled by the drive signals 124.

As shown, the motor 130 is also coupled to the motor controller 102 aspart of a feedback or control loop that includes components of the motorcontroller 102. More specifically, the motor controller 102 receiveswhichever phase currents (e.g., two of I_(A), I_(B), or I_(C)) areinjected into respective coils of the motor 130. To measure the phasecurrents, the motor controller 102 includes a current sense circuit 104configured to obtain first phase current sense measurements of a firstphase current (I_(A)) and second phase current sense measurements of afirst phase current (I_(B)). In the example of FIG. 1, the current sensecircuit 104 is represented as having measurement paths 106 with currentsense amplifiers (CSA) 108 (e.g., one CSA for each of the measurementpaths 106 is preferable) and with a path alternation circuit 110. Insome example embodiments, the path alternation circuit 110 includes twomultiplexers (see e.g., the current sense circuit 300 of FIG. 3) toprovide current sense measurements for a first phase current (e.g., oneof I_(A), I_(B), and I_(C)) and a second phase current (e.g., another ofI_(A), I_(B), and I_(C)) using alternate paths.

In the example of FIG. 1, the first and second phase current sensemeasurements 114 (e.g., current sense values for each phase obtainedusing alternate paths, where the values for each phase are averaged anddigitized) are provided to a position analyzer 112, which determines arotor position based on the first and second phase current sensemeasurements 114 using conventional techniques (e.g., a sensorless FOCalgorithm). The position analyzer 112 is configured to output controlsignals 116 to the pulse generation circuit 117 based on the first andsecond phase current sense measurements 114 and/or the determined rotorposition. In some example embodiments, the position analyzer 112 uses aconventional sensorless FOC algorithm to determine rotor position basedon the first and second phase current sense measurements 114.

FIGS. 2A and 2B is a block diagram showing a system 200 with FOC motorcontrol in accordance with an example embodiment. As shown, the system200 comprises a processor 220 configured to perform various conventionalsensorless FOC operations represented by blocks 222, 224, 226, 228, 230,232, 234, 236, 238, 240, 242, 244, and 246. More specifically, block 222corresponds to Clarke operations based on obtained first and secondphase current sense measurements from a current sense circuit 204 (anexample of the current sense circuit 104 in FIG. 1), where the accuracyof the first and second phase current sense measurements are improved byuse of the path alternation circuit 110. Block 224 corresponds to Parkoperations based on the outputs (I_(α) and I_(β)) from block 222 and atheta estimate (θ_(EST)) from block 226. Block 226 corresponds to backelectromagnetic force (BEMF) observer operations based on the outputsfrom block 222. Block 228 corresponds to speed profile operationsinvolving ω_(CMD), where ω_(CMD) is a user defined speed command. Block230 corresponds to acceleration control operations based on the outputof block 228. Block 232 corresponds to speed controller operations basedon the outputs of blocks 226 and 230. Block 234 corresponds to currentcontrol operations based on the output of block 232, where the output ofblock 234 is a command current (I_(Q_CMD)). Block 236 corresponds totorque controller operations based on I_(Q_CMD) from block 234 and I_(Q)from block 224. Block 238 corresponds to voltage ramp operations basedon the output (V_(Q)) of block 236. Block 240 corresponds to fluxcontroller operations based on a first current (I_(D_CMD)) and a secondcurrent (I_(D)) from block 224. Block 242 corresponds to voltage rampoperations based on the output (V_(D)) of block 240. Block 244corresponds to inverse Park operations based on the outputs from block238 and 242. Block 246 corresponds to inverse Clarke and space vectormodulation (SVM) operations based on the outputs (V_(α) and V_(β)) fromblock 244.

In some example embodiments, the outputs of block 246 corresponds to thecontrol signals 116 (e.g., V_(A), V_(B), V_(C)) for a pulse generationcircuit 117 coupled to a motor. Again, the pulse generation circuit 117includes a PWM controller 118, a gate driver 122, and a 3-phase inverter12. As part of the control loop for the system 200, current sensemeasurements from the motor 130 are obtained using the current sensecircuit 204. In the example of FIG. 2, the current sense circuit 204 isrepresented as having measurement paths 206 with CSAs 208 (e.g., one CSAfor each of the measurement paths 206) and with a path alternationcircuit 210. In some example embodiments, the path alternation circuit210 includes two multiplexers (see e.g., the current sense circuit 300of FIG. 3) to provide alternating current sense measurements for a firstphase current (e.g., I_(A)) and a second phase current (e.g., I_(B)). Insome example embodiments, the current sense circuit 204 also includesanalog-to-digital converters (ADCs) 212 (e.g., to digitize first phaseand second phase current sense measurements along each of the alternatepaths corresponding to each of the measurement paths 206). The currentsense circuit 204 also includes a processor 214. In some exampleembodiments, the processor 214 receives the outputs of the ADCs 212,where the obtained first phase and second phase current sensemeasurements provided by the current sense circuit 204 are based on theprocessor 214 averaging a set of digital first phase current sensemeasurements obtained using measurement paths 206 and the pathalternation circuit 210. The processor 214 also averages a set ofdigital second phase current sense measurements obtained usingmeasurement paths 206 and the path alternation circuit 210. In someexample embodiments, the processor 214 is separate from the processor220. In other examples, processor 214 and processor 220 are implementedin a single processor.

In some example embodiments, a system (e.g., the system 100 of FIG. 1,or the system 200 of FIGS. 2A and 2B) includes a motor (e.g., the motor130 in FIGS. 1 and 2B) and a pulse generation circuit (e.g., the pulsegeneration circuit 117) coupled to the motor. In one example embodiment,motor 130 is a permanent magnet synchronous motor (“PMSM”). In otherembodiments, motor 130 is a brushless DC motor (“BLDC”). The system alsoincludes a motor controller (e.g., the motor controller 102 in FIG. 1)coupled to the pulse generation circuit, where the motor controllerincludes a current sense circuit (e.g., the current sense circuit 104 inFIG. 1, or the current sense circuit 204 in FIG. 2) configured to:obtain a set of first phase current sense measurements using a firstpair of paths and to average the set of first phase current sensemeasurements; and obtain a set of second phase current measurementsusing a second pair of paths and to average the set of second phasecurrent sense measurements. In some example embodiments, the motorcontroller comprises a processor configured to determine control signals(e.g., control signals 116 in FIGS. 1 and 2B) for the motor based on aFOC algorithm that uses an averaged set of first phase current sensemeasurements values and an averaged set of second phase current sensemeasurements values.

FIG. 3 is a diagram showing a current sense circuit 300 (an example ofthe current sense circuit 104 in FIG. 1, or the current sense circuit204 in FIG. 2) for a motor controller (e.g., the motor controller 102 inFIG. 1) in accordance with some examples. As shown, the current sensecircuit 300 includes a first phase (e.g., phase A) current sense circuit302A and a second phase (e.g., phase B) current sense circuit 302B.Though not shown in FIG. 3, it should be understood that the currentsense circuit 300 may also include a third phase (e.g., phase C) currentsense circuit, where usually two of the three available phase currentsare injected into a motor during initial position detection (IPD)operations and/or ongoing motor control operations. In the example ofFIG. 3, the first phase current sense circuit 302A outputs a firstvoltage differential (e.g., the voltage across a first sense resistor)to represent the first phase current. The second phase current sensecircuit 302B outputs a second voltage differential (e.g., the voltageacross a second sense resistor) to represent the second phase current.

The current sense circuit 300 also includes a first multiplexer 306coupled to the first and second phase current sense circuits 302A and302B. As shown, the first phase current sense circuit 302A is coupled toa first input of the first multiplexer 306, and the second phase currentsense circuit 302B is coupled to a second input of the first multiplexer306. The current sense circuit 300 also includes a second multiplexer308 coupled the first and second phase current sense circuits 302A and302B. As shown, the second phase current sense circuit 302A is coupledto a second input of the second multiplexer 308, and the second phasecurrent sense circuit 302B is coupled to a first input of the firstmultiplexer 306. In some example embodiments, the use of firstmultiplexer 306 in conjunction with second multiplexer 308 allows foralternating measurements for each phase current. By averaging themeasurements obtained for each phase current using alternating paths,the gain error and offset of each measurement path is equalized, whichimproves the accuracy of the phase current measurements. These moreaccurate phase current measurements improve the accuracy of subsequentmotor control operations (e.g., rotor position estimation and subsequentmotor control signals), which reduces torque ripple, jittering, andacoustic noise.

The current sense circuit 300 also includes a controller 304 coupled tothe first and second multiplexers 306 and 308, and configured to providea control signal (mux_ch_sel). When mux_ch_sel is 0 (for example), thefirst multiplexer 306 outputs the output from the first phase currentsense circuit 302A, and the second multiplexer 306 outputs the outputfrom the second phase current sense circuit 302B. When mux_ch_sel is 1(in this example), the first multiplexer 306 outputs the output from thesecond phase current sense circuit 302A, and the second multiplexer 306outputs the output from the first phase current sense circuit 302B. Insome example embodiments, the controller 304 alternates mux_ch_selbetween 0 and 1 such that the first and second multiplexers 306 and 308alternate the measurement paths conveying the output of the first phasecurrent sense circuit 302A and the output of the second phase currentsense circuit 302B.

In the example of FIG. 3, each measurement path includes a current senseamplifier (CSA), which applies a gain and offset to the sensed signal.Without using an example embodiment, the difference in the gains andoffsets applied by different CSAs to different phase currents addsinaccuracy to the end results. Using an example embodiment (use ofalternating paths for each phase current and subsequent averaging ofresults for each phase current), each phase current is affected equallyby the gain error and offset of different CSAs, which improves theoverall accuracy of multi-phase calculations such as rotor positionestimation.

In some example embodiments, a first measurement path at the output ofthe first multiplexer 306 includes a first CSA 310 and an ADC 314 with afirst channel (channel 1) coupled to an output of the first CSA 310.Also, a second measurement path at the output of the second multiplexer308 includes a second CSA 312 and the ADC 314 with a second channel(channel 2) coupled to an output of the second CSA 312. In otherexamples, separate ADCs are used rather than the multi-channel ADC 314.

In the example of FIG. 3, the ADC 314 is part of a processor 313. In theexample of FIG. 3, to process the digital values output from the ADC314, the processor 313 executes code 316 represented by blocks 320, 322,324, 326, 328, and 330 to perform averaging of first phase current sensemeasurements received via alternating measurement paths (averaging ofsecond phase current sense measurements or third phase current sensemeasurements received via alternating measurement paths is notrepresented, but is similarly performed as needed by the processor 313).In some example embodiments, the code 316 identifies if mux_ch_sel is 0or 1 at decision block 320. If the mux_ch_sel is 0, the next digitalsample of the first phase current sense measurement is provided bychannel1 of the ADC 314 at block 322. If the mux_ch_sel is 1, the nextdigital sample of the first phase current sense measurement is providedby channel2 of the ADC 314 at block 324. At block 326, the next digitalsample of the first phase current sense measurement and the previousdigital sample of the first phase current sense measurement (fromalternating measurement paths) are averaged. At block 328, the nextdigital sample of the first phase current sense measurement is set asthe previous digital sample of the first phase current sensemeasurement. At block 330, mux_ch_sel is updated to alternate thecontrol signal value (from 0 to 1, or 1 to 0). The averaging of firstphase current sense measurements is repeated as desired, where theaveraged first phase current sense measurements are used for rotorposition estimation operations and/or other motor control operations asdescribed herein. As previously noted, in some example embodiments,similar operations are used to average second phase current sensemeasurements or third phase current sense measurements, where theaveraged first, second, or third phase current sense measurements areused for rotor position estimation operations and/or other motor controloperations as described herein. Also, in some example embodiments,similar operations are used to average third phase (e.g., phase C)current sense measurements, where the averaged third phase current sensemeasurements are used for rotor position estimation operations and/orother motor control operations as described herein. In some exampleembodiments, the processor 313 also performs other operations related torotor position estimation and/or otherwise generating motor controlsignals as described herein. In other examples, the processor 313provides the averaged current sense measurements to another processor toperform rotor position estimation and/or to otherwise generate motorcontrol signals as described herein.

In some example embodiments, a system (e.g., the system 100 of FIG. 1,or the system 200 of FIG. 2) includes a current sense circuit (e.g., thecurrent sense circuit 104 of FIG. 1, the current sense circuit 204 ofFIG. 2, or the current sense circuit 300 of FIG. 3) with a firstmultiplexer (e.g., the first multiplexer 306 in FIG. 3) with inputscoupled to the first pair of paths. The current sense circuit alsoincludes a second multiplexer (e.g., the second multiplexer 308 in FIG.3) with inputs coupled to the second pair of paths. The current sensecircuit also includes a first CSA (e.g., one of the CSAs 108 in FIG. 1,one of the CSAs 208 in FIG. 3, the first CSA 310 in FIG. 3) coupled toan output of the first multiplexer. The current sense circuit alsoincludes a second CSA (e.g., one of the CSAs 108 in FIG. 1, one of theCSAs 208 in FIG. 3, the second CSA 312 in FIG. 3) coupled to an outputof the second multiplexer.

In some example embodiments, the current sense circuit includes a firstADC channel (e.g., one of the ADCs 212, or a first channel of the ADC314) coupled to an output of the first current sense amplifier. Thecurrent sense circuit includes a second ADC channel (e.g., one of theADCs 212, or a second channel of the ADC 314) coupled to an output ofthe second current sense amplifier. In some example embodiments, thecurrent sense circuit includes a processor (e.g., the processor 214 inFIG. 2, the processor 220 in FIG. 2, or the processor 313 in FIG. 3)coupled to an output of first ADC channel and to an output of the secondADC channel, wherein the processor is configured to determine a rotorposition based on a digitized version of the first phase sense currentvalues and digitized version of the set of second phase sense currentvalues output from the first ADC channel and the second ADC channel. Insome example embodiments, the processor is configured to averagedigitized and consecutive first phase current sense measurement valuesand to average digitized and consecutive second phase current sensemeasurement values. Also, in some example embodiments, the current sensecircuit (e.g., the current sense circuit 104 in FIG. 1, the currentsense circuit 204 in FIG. 2, or the current sense circuit 300 in FIG. 3)includes a first phase current measurement circuit (e.g., the firstphase current measurement circuit 302A in FIG. 3) coupled to a firstpath of the first pair of paths and to a second path of the second pairof paths, wherein the first phase current measurement circuit isconfigured to provide a first phase current measurement voltage. Thecurrent sense circuit also includes a second phase current measurementcircuit (e.g., the first phase current measurement circuit 302B in FIG.3) coupled to a second path of the first pair of paths and to a firstpath of the second pair of paths, wherein the second phase currentmeasurement circuit is configured to provide a second phase currentmeasurement voltage.

In some example embodiments, the current sense circuit further comprisesa controller (e.g., the controller 304 in FIG. 3) coupled to the firstmultiplexer and the second multiplexer, where the controller isconfigured to control the first multiplexer to alternate between passingthe first phase current sense measurement voltage and the second phasecurrent sense measurement voltage, and where the controller isconfigured to control the second multiplexer to alternate betweenpassing the second phase current sense voltage and the first phasecurrent sense voltage. In combination with alternating the paths used topass the first and second phase current sense measurement voltage, insome example embodiments, a processor is configured to averageconsecutive samples of the first phase current sense voltage. Also, theprocessor is configured to average consecutive samples of the secondphase current sense voltage. In other example embodiments, a singleprocessing unit may be utilized instead of separate processors.Alternatively, block 316 may be implemented in hardware.

FIG. 4 is a graph 400 showing motor speed ripple due to measurement pathgain error with and without the proposed alternation of current sensemeasurement paths and subsequent averaging as described herein for someexample embodiments. In the graph 400, the vertical axis of graph 400shows motor speed in rotations per minute (RPM) and the horizontal axisshows elapsed time (in seconds). The existing (bolded line) waveform ofgraph 400 represents motor speed ripple due to measurement path gainerror without alternating the current sense measurement paths asdescribed herein. The phase matched (solid thin line) waveform of graph400 represents motor speed ripple due to measurement path gain errorwhere phase matching is used to reduce the motor speed ripple. As usedherein, “phase matched” refers to an idealized scenario, where the gainerror for each phase current is matched (e.g., the CSAs are perfectlymatched). The dashed line of graph 400 represents motor speed ripple dueto measurement path gain error where alternating the measurement pathsand averaging the obtained measurements for each phase current as insome example embodiments is used to cancel the gain error and thusreduce the motor speed ripple.

FIG. 5 is a graph 500 showing theta error in degrees (rotor positionerror) due to measurement path gain error with and without the proposedalternation of current sense measurement paths and subsequent averagingas described herein for some example embodiments. The existing (boldedline) waveform of graph 500 represents theta error due to measurementpath gain error using conventional technology. The phase matched (solidthin line) waveform of graph 500 represents theta error due tomeasurement path gain error where phase matching is used to reduce thetheta error. The dashed line of graph 500 represents theta error due tomeasurement path gain error where alternating measurement paths andaveraging of some example embodiments is used to reduce the theta error.

FIG. 6 is a graph 600 showing motor speed ripple due to measurement pathgain error and offset with and without the proposed alternation ofcurrent sense measurement paths and subsequent averaging as describedherein for some example embodiments. The existing (bolded line) waveformof graph 600 represents motor speed ripple due to measurement path gainerror and offset using conventional technology. The phase matched (solidthin line) waveform of graph 600 represents motor speed ripple due tomeasurement path gain error and offset where phase matching is used toreduce the motor speed ripple. The dashed line of graph 600 representsmotor speed ripple due to measurement path gain error and offset wherealternating the measurement paths and averaging as in some exampleembodiments is used to reduce the motor speed ripple. Comparing graph400 of FIG. 4 and graph 600 of FIG. 6, it can be seen that alternatingthe current sense measurement paths as described herein reduces motorspeed ripple due to gain error, but does not reduce motor speed rippledue to offset.

FIG. 7 is a graph 700 showing theta error due to measurement path gainerror and offset with and without the proposed alternation of currentsense measurement paths and subsequent averaging as described herein forat least some example embodiments. The existing (bolded line) waveformof graph 700 represents theta error due to measurement path gain errorand offset using conventional technology. The phase matched (normalline) waveform of graph 700 represents theta error due to measurementpath gain error and offset where phase matching is used to reduce thetheta error. The dashed line of graph 700 represents theta error due tomeasurement path gain error and offset where alternating measurementpaths and averaging as in some example embodiments is used to reduce thetheta error. Comparing graph 500 of FIG. 5 and graph 700 of FIG. 7, itcan be seen that alternating the current sense measurement paths as insome example embodiments reduces theta error due to gain error, but doesnot reduce theta error due to offset.

FIG. 8 is a flow chart showing a motor control method 800 in accordancewith some examples. As shown, the motor control method 800 includesreceiving current sense voltages for two phases of a motor (e.g., fromthe first and second phase current sense circuits 302A and 302B in FIG.3) at block 802. At block 804, currents are calculated for the twophases based on alternating measurement paths for the received currentsense voltages. In other words, block 804 involves obtaining first phasecurrent sense measurements using alternating measurement paths, andobtaining second phase current sense measurements using alternatingmeasurement paths.

In some example embodiments, the operations of block 804 involveadjusting control signals for a first multiplexer and a secondmultiplexer to obtain the first phase current sense measurements usingalternating measurement paths, and to obtain the second phase currentsense measurements using alternating measurement paths. In some exampleembodiments, the operations of block 804 involve amplifying outputs ofthe first and second multiplexers to obtain the first phase currentsense measurements using alternating measurement paths, and to obtainthe second phase current sense measurements using alternatingmeasurement paths. In some example embodiments, the operations of block804 involve digitizing outputs of the first and second multiplexers. Insome example embodiments, the operations of block 804 include averaginga set of digital and consecutive first phase current sense measurementsobtained using different measurement paths (e.g., measurement paths 206)and a path alternation circuit (e.g., the path alternation circuit 210in FIG. 2, or the first and second multiplexers 306 and 308 in FIG. 3).Also, in some example embodiments, the operations of block 804 involveaveraging a set of digital and consecutive second phase current sensemeasurements obtained using different measurement paths (e.g.,measurement paths 206) and a path alternation circuit (e.g., the pathalternation circuit 210 in FIG. 2, or the first and second multiplexers306 and 308 in FIG. 3).

At block 806, a rotor position is determined based on the currentscalculated at block 804. At block 808, control signals are provided to aPWM generator based on the determined rotor position. In some exampleembodiments, an FOC algorithm is used to determine rotor position basedon the calculated currents. In other words, in some example embodiments,block 808 involves determining control signals for a motor based on theobtained first phase current sense measurements and the obtained firstphase current sense measurements. At block 810, PWM signals aregenerated based on the control signals (such as control signals 116)provided at block 808. At block 812, gate drive signals are generatedbased on the PWM signals to control switches of a 3-phase inverter andprovide current to the motor.

In some example embodiments, the control signals (e.g., the controlsignals 116) determined at block 808 are the components of the statorvector voltage in the (α, β) stationary orthogonal reference frame.These control signals are the inputs to a PWM generator (e.g., aspace-vector PWM generator). The PWM signals generated at block 810 areused to control both the frequency and magnitude of the voltage andcurrent applied to a motor. As a result, PWM inverter-powered motordrivers offer better efficiency and higher performance compared to fixedfrequency motor drivers. The energy that a PWM inverter (e.g., the3-phase inverter 126) delivers to a motor is controlled by the PWMsignals (e.g., the PWM signals 120) generated at block 810, whichdetermine the timing of drive signals (e.g., the drive signals 124) tothe gates of the power transistors of the PWM inverter. In differentexample embodiments, different PWM techniques (ways of determining themodulating signal and the switch-on/switch-off instants from themodulating signal) are possible. Available options includes sinusoidalPWM, hysteric PWM and the relatively new space-vector (SV) PWM.

A typical three-phase inverter controls six power transistors (Q1-Q6) toprovide three output voltages (Va, Vb and Vc) based on drive signal a,a′, b, b′, c and c′. Specifically, a is the drive signal for high-sideswitch Q1, a′ is the drive signal for low-side switch Q2, b is the drivesignal for high-side switch Q3, b′ is the drive signal for low-sideswitch Q4, c is the drive signal for high-side switch Q5, c′ is thedrive signal for low-side switch Q6. When an high-side transistor isswitched on (i.e., when a, b or c is 1), the corresponding low-sidetransistor is switched off (i.e., the corresponding a′, b′ or c′ is 0).The on and off states of the upper transistors, Q1, Q3 and Q5, orequivalently, the state of a, b and c, are sufficient to evaluate theoutput voltage for the purpose of this discussion.

With space-vector PWM, the relationship between the switching variablevector [a, b, c]^(t), the line-to-line output voltage vector [Vab VbcVca]^(t), and the phase (line-to-neutral) output voltage vector [Va VbVc]^(t) is given by equations 1 and 2 below.

$\begin{matrix}{{\begin{bmatrix}V_{ab} \\V_{bc} \\V_{ca}\end{bmatrix} = {{V_{dc}\begin{bmatrix}1 & {- 1} & 0 \\0 & 1 & {- 1} \\{- 1} & 0 & 1\end{bmatrix}}\begin{bmatrix}a \\b \\c\end{bmatrix}}},} & {{Equation}\mspace{14mu}(1)} \\{{\begin{bmatrix}V_{a} \\V_{b} \\V_{c}\end{bmatrix} = {\frac{1}{3}{{V_{dc}\begin{bmatrix}1 & {- 1} & 0 \\0 & 1 & {- 1} \\{- 1} & 0 & 1\end{bmatrix}}\begin{bmatrix}a \\b \\c\end{bmatrix}}}},} & {{Equation}\mspace{14mu}(2)}\end{matrix}$where V_(dc) is the DC supply voltage, or bus voltage. There are eightpossible combinations of on and off states for the three high-side powertransistors. In equations 1 and 2, the eight combination and the derivedoutput line-to-line and phase voltages are expressed in terms of Vdc.Table 1 shows device on/off states and corresponding outputs (relativeto V_(dc)) of a 3-phase inverter.

a b c V_(a) V_(b) V_(c) V_(ab) V_(bc) V_(ca) 0 0 0 0 0 0 0 0 0 1 0 0  ⅔−⅓ −⅓ 1 0 −1 1 1 0  ⅓  ⅓ −⅔ 0 1 −1 0 1 0 −⅓  ⅔ −⅓ −1 1 0 0 1 1 −⅔  ⅓  ⅓−1 0 1 0 0 1 −⅓ −⅓  ⅔ 0 −1 1 1 0 1  ⅓ −⅔  ⅓ 1 −1 0 1 1 1 0 0 0 0 0 0In the proposed example embodiments, use of a path alternation circuitand averaging of measurements as described herein improves the overallaccuracy of the phase measurements by reducing the effect of measurementpath gain error. These more accurate phase measurements are used by amotor controller to estimate rotor position and provide control signals(e.g., the control signals 116) for a PWM generator based on theestimated rotor position. The control signals determine the timing ofthe drive signals a, a′, b, b′, c and c′ for the power transistors of a3-phase inverter, resulting in phase voltages (V_(a), V_(b), V_(c))being applied to the motor and related phase currents (I_(A), I_(B),I_(C)) through the motor.

Certain terms have been used throughout this description and claims torefer to particular system components. As one skilled in the art willappreciate, different parties may refer to a component by differentnames. This document does not intend to distinguish between componentsthat differ only in name but not in their respective functions orstructures. In this disclosure and claims, the terms “including” and“comprising” are used in an open-ended fashion, and thus should beinterpreted to mean “including, but not limited to . . . .”

The term “couple” is used throughout the specification. The term maycover connections, communications, or signal paths that enable afunctional relationship consistent with the description of the presentdisclosure. For example, if device A generates a signal to controldevice B to perform an action, in a first example device A is coupled todevice B by direct connection, or in a second example device A iscoupled to device B through intervening component C if interveningcomponent C does not alter the functional relationship between device Aand device B such that device B is controlled by device A via thecontrol signal generated by device A.

The above discussion is meant to be illustrative of the principles andvarious embodiments of the present invention. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated.

What is claimed is:
 1. A system, comprising: a motor controller adaptedto be coupled to a motor, wherein the motor controller includes acurrent sense circuit configured to: receive a first phase current sensemeasurement on a first measurement path; receive the first phase currentsense measurement on a second measurement path; receive a second phasecurrent measurement on the first measurement path; receive the secondphase current on the second measurement path; average the first phasecurrent sense measurement on the first measurement path with the firstphase current sense measurement on the second path; and average thesecond phase current sense measurement on the first measurement pathwith the second phase current sense measurement on the second path. 2.The system of claim 1, wherein the current sense circuit comprises: afirst multiplexer with a first input and a second input; a secondmultiplexer with a first input coupled to the second input of the firstmultiplexer and a second input coupled to the first input of the firstmultiplexer; and wherein the first measurement path is through the firstmultiplexer and the second measurement path is through the secondmultiplexer.
 3. The system of claim 2, wherein the current sense circuitcomprises: a first current sense amplifier coupled to an output of thefirst multiplexer; and a second current sense amplifier coupled to anoutput of the second multiplexer.
 4. The system of claim 2, wherein thecurrent sense circuit further comprises a controller coupled to thefirst multiplexer and the second multiplexer, and wherein the controlleris configured to control the first multiplexer to alternate betweenpassing the first phase current sense measurement and the second phasecurrent sense measurement, and wherein the controller is configured tocontrol the second multiplexer to alternate between passing the secondphase current sense measurement and the first phase current sensemeasurement.
 5. The system of claim 3, further comprising: a firstanalog-to-digital converter (ADC) channel coupled to an output of thefirst current sense amplifier, wherein the first ADC channel isconfigured to output digital samples of the first and second phasecurrent sense measurements from the first measurement path; and a secondADC channel coupled to an output of the second current sense amplifier,wherein the second ADC channel is configured to output digital samplesof the first and second phase current sense measurements from the secondmeasurement path.
 6. The system of claim 5, further comprising aprocessor coupled to an output of the first ADC channel and to an outputof the second ADC channel, wherein the processor is configured todetermine a rotor position based on the digital samples of the firstphase current sense measurements from the first and second measurementpaths and based on the digital samples of the second phase current sensemeasurements from the first and second measurement paths.
 7. The systemof claim 5, wherein the motor controller comprises a processorconfigured to determine control signals for the motor based on asensorless field oriented control (FOC) algorithm that uses an averagedset of consecutive digital samples of the first phase current sensemeasurement and an averaged set of consecutive second phase currentsense measurements values.
 8. The system of claim 6, wherein theprocessor is configured to average consecutive digital samples of thefirst phase current sense measurement and to average consecutive digitalsamples of the second phase current sense measurement.
 9. The system ofclaim 1, wherein the motor and the motor controller are components of afan.
 10. An integrated circuit (IC), comprising: a current sense circuitcoupled to a processor, wherein the current sense circuit comprises: afirst phase current sense circuit; a second phase current sense circuit;a first multiplexer with inputs coupled to the first and second phasecurrent sense circuits; a second multiplexer with inputs coupled to thefirst and second phase current sense circuits; a first current senseamplifier coupled to an output of the first multiplexer; and a secondcurrent sense amplifier coupled to an output of the second multiplexer.11. The IC of claim 10, further comprising: a first analog-to-digitalconverter (ADC) channel coupled to an output of the first current senseamplifier; and a second ADC channel coupled to an output of the secondcurrent sense amplifier.
 12. The IC of claim 11, further comprising aprocessor coupled to an output of the first ADC channel and to an outputof the second ADC channel, wherein the processor is configured toaverage a set of digital and consecutive first phase current sensemeasurement values and to average a set of digital and consecutivesecond phase current sense measurement values provided by the first andsecond ADC channels.
 13. The IC of claim 12, wherein the processor isfurther configured to determine a rotor position based on the averageddigital first phase current sense measurement values and the averageddigital second phase current sense measurement values.
 14. The IC ofclaim 10, wherein the current sense circuit further comprises acontroller coupled to the first multiplexer and the second multiplexer,and wherein the controller is configured to control the firstmultiplexer to alternate between passing a first phase current sensemeasurement voltage from the first phase current sense circuit and asecond phase current sense measurement voltage from the second phasecurrent sense circuit the second phase current sense measurementvoltage, and wherein the controller is configured to control the secondmultiplexer to alternate between passing the second phase current sensevoltage and the first phase current sense voltage.
 15. A motor controlmethod, comprising: obtaining first phase current sense measurementsusing alternating measurement paths by averaging a set of digital andconsecutive first phase current sense measurements obtained using thealternating measurement paths; obtaining second phase current sensemeasurements using alternating measurement paths by averaging a set ofdigital and consecutive second phase current sense measurements obtainedusing the alternating measurement paths; and determining control signalsfor a motor based on the obtained first phase current sense measurementsand the obtained second phase current sense measurements.
 16. The motorcontrol method of claim 15, wherein obtaining the first phase currentsense measurements using alternating measurement paths and obtaining thesecond phase current sense measurements using alternating measurementpaths comprises adjusting control signals for a first multiplexer and asecond multiplexer.
 17. The motor control method of claim 16, whereinobtaining the first phase current sense measurements using alternatingmeasurement paths and obtaining the second phase current sensemeasurements using alternating measurement paths comprises amplifyingoutputs of the first and second multiplexers.
 18. The motor controlmethod of claim 16, wherein obtaining the first phase current sensemeasurements using alternating measurement paths and obtaining thesecond phase current sense measurements using alternating measurementpaths comprises digitizing outputs of the first and second multiplexers.